cmake_minimum_required(VERSION 3.10 FATAL_ERROR)

project(TRAINING CXX C)

macro(ADD_EXEC FILE_PATH)
    get_filename_component(FILENAME ${FILE_PATH} NAME_WE)
    add_executable(${FILENAME} ${FILE_PATH})
endmacro()

file(
    GLOB
    CPP_SOURCES
    *.cpp
)

foreach(FILE IN LISTS CPP_SOURCES)
    ADD_EXEC(${FILE})
endforeach()
